package factory.builder_pattern;

public class BuiderPatternDemo {
    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();

        Meal vegMeal = mealBuilder.prepareVegMeal();
        System.out.println("素食");
        vegMeal.showItems();
        System.out.println("价格总计: " +vegMeal.getCost());

        System.out.println("非素食");
        Meal nonVegMeal = mealBuilder.prepareNonVegMeal();
        nonVegMeal.showItems();
        System.out.println("价格总计: " +nonVegMeal.getCost());
    }
}
